﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace _20235_16学生或老师登录
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void longing_button_Click(object sender, EventArgs e)
        {
            if(student_button.Checked==true)
            {
                if(username.Text=="彭定俊"&&userpassward.Text=="123456789")
                {
                    MessageBox.Show("学生登陆成功");
                }
                else
                {
                    MessageBox.Show("学生登陆失败");
                    username.Text = "";
                    userpassward.Text = "";
                    username.Focus();
                }
            }
            else if(teacher_button.Checked==true)
            {
                if(username.Text=="彭老师"&&userpassward.Text=="123456789")
                {
                    MessageBox.Show("老师登陆成功");
                }
                else
                {
                    MessageBox.Show("老师登陆失败");
                    username.Text = "";
                    userpassward.Text = "";
                    username.Focus();
                }
                
            }
            else
            {
                MessageBox.Show("还未选择身份");
            }

        }
    }
}
